﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp4
{
    class SumUtils:Father 
    {
        public int a;
        public override void xiangjia()
        {
            base.xiangjia();
            int sum = 0;
            int sum1 = 0;
            for (int i = 0; i <= a; i++)
            {
                sum = i + 2;
                sum1 = 1 + sum;
            }
            Console.WriteLine("1到指定数的和为：{0}",sum1);
        }
    }
}
